<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="<?=base_url()?>res/css/css.css" rel="stylesheet" type="text/css" />
    </head>
                    <table style="margin: 0 auto" class="formtable"  width="680" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th colspan="2" align="center" valign="middle">&nbsp;ข้อมูลอาจารย์</th>
                      </tr>
                      <tr>
                        <th width="177" align="right" valign="middle">&nbsp;ชื่อ-นามสกุล :</th>
                        <td width="423" align="left" valign="middle">&nbsp;<b><?=$teacher_datay->teacher_name?></b></td>
                      </tr>
                      <tr>
                        <th align="right" valign="middle">&nbsp;รหัสอาจารย์ :</th>
                        <td align="left" valign="middle">&nbsp;<?=$teacher_datay->teacher_code?></td>
                      </tr>
                      <tr>
                        <th align="right" valign="middle">&nbsp;โปรแกรมวิชา :</th>
                        <td align="left" valign="middle">&nbsp;<?=$teacher_datay->major_title?></td>
                      </tr>
                    </table>
                    <div style="height:30px"></div>
                    <table style="margin: 0 auto"  align="center"  class="formtable" width="94%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th colspan="8" align="center" valign="middle">
                            &nbsp;<b>แสดงข้อมูลการดูแลกิจกรรม <?=$teacher_activity->num_rows()?>  รายการ</b>
                        </th>
                      </tr>
                      <tr>
                        <th width="2%" align="center" valign="middle">ลำดับ</th>
                        <th width="13%" align="center" valign="middle">ชื่อกิจกรรม</th>
                        <th width="5%" align="center" valign="middle">เริ่มลงทะเบียน</th>
                        <th width="6%" align="center" valign="middle">สิ้นสุดลงทะเบียน</th>
                        <th width="6%" align="center" valign="middle">เริ่มกิจกรรม</th>
                        <th width="6%" align="center" valign="middle">สิ้นสุดกิจกรรม</th>
                      </tr>
                      <?php $no = 1; ?>
                      <?php foreach($teacher_activity->result_array() as $row){  ?>
                      <tr>
                        <td align="center" valign="middle">&nbsp;<b><?=$no?></b></td>
                        <td align="left" valign="middle">&nbsp;<?=$row["act_title"]?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_start_reg_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_end_reg_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_start_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_end_date"])?></td>
                      </tr>
                      <?php $no++;} ?>
                    </table>
                    <?php $content= ob_get_contents();
                                                  ob_end_clean(); 
                                    echo $content;
                                    @file_put_contents("res/temp/rp001.xls", $teacher_content . $content);
                               
                    ?>
                    <div style="height:30px"></div>
                    <script>
                       window.print();
                    </script>
</html>

